obj-m += devbtn.o drvbtn.o

all:
	make -C /opt/kernel SUBDIRS=$(PWD) modules
	arm-cortex_a9-linux-gnueabi-gcc -shared -fpic -o libhwbtn.so hwbtn.c
	arm-cortex_a9-linux-gnueabi-gcc -o btnMain main.c -L. -lhwbtn
	cp *.ko /opt/rootfs/home/drivers/
	cp *.so /opt/rootfs/home/hwlib/
	cp btnMain /opt/rootfs/home/apptest/
clean:
	make -C /opt/kernel SUBDIRS=$(PWD) clean
	rm -rf *.ko *.o *.so btnMain
